using System;
using System.Collections.Generic;
using System.Text;

namespace SmartContentDB.Interfaces
{
    public class Document
    {
        #region Variables
        private int id;
        private string creator;
        private string[] fields;
        private bool visible;
        private bool editable;
        private bool exportable;
        private bool printable;
        #endregion

        #region Constructor
        public Document()
        {
            this.id = -1;
            this.creator = null;
            this.visible = true;
            this.editable = false;
            this.exportable = false;
            this.printable = false;
        }
        public Document(int id, string creator, Decimal visible, Decimal editable, Decimal exportable, Decimal printable)
        {
            this.id = id;
            this.creator = creator;
            this.visible = visible > 0;
            this.editable = editable > 0;
            this.exportable = exportable > 0;
            this.printable = printable > 0;
        }
        #endregion

        #region Set/Get
        public int getId()
        {
            return id;
        }
        public string getCreator()
        {
            return creator;
        }
        public bool isEditable()
        {
            return editable;
        }
        public bool isVisible()
        {
            return visible;
        }
        public bool isExportable()
        {
            return exportable;
        }
        public bool isPrintable()
        {
            return printable;
        }
        public string[] Fields
        {
            set { fields = value; }
            get { return fields; }
        }
        #endregion
    }
}
